<%@ page contentType="text/html;charset=UTF-8" language="java"  isELIgnored="false" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
    <title>用户列表</title>
</head>
<body>
    <table>
        <tr>
            <td>用户Id</td>
            <td>用户名</td>
            <td>用户昵称</td>
            <td>创建时间</td>
            <td>所属部门</td>
            <td>邮件地址</td>
            <td>角色</td>
            <td>操作</td>
        </tr>
        <s:iterator value="#users">
        <tr>
            <td>${id}</td>
            <td>${username}</td>
            <td>${nickname}</td>
            <td>${createTime}</td>
            <td>${department.name}</td>
            <td>${email}</td>
            <td>
            <s:iterator value="roles">
                ${name}
            </s:iterator>
            </td>
            <td>
                <a href="${pageContext.request.contextPath}/user_delete?id=${id}">删除</a>
                <a href="${pageContext.request.contextPath}/user_editPrepare?id=${id}">编辑</a>
            </td>
        </tr>
        </s:iterator>
    </table>
    <a href="${pageContext.request.contextPath}/user_addPrepare">添加用户</a>
</body>
</html>
